package ${classPath};
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

<#assign instance="${domain?substring(0,1)?lower_case}${domain?substring(1)}"/>

@Data
@ToString
public class ${domain}EditBo {
  
<#list fieldList as field>


<#compress>
  /** ${field.comment} */<#list field.annotations as annotation> <#--内层循环-->
<#if field.name!="id">
  <#if !annotation?starts_with("@Co")&&!annotation?starts_with("@En")>
    ${annotation}
  </#if>
</#if>
</#list>
  private ${field.type} ${field.name};
</#compress>
</#list>

  public void apply(${domain} ${instance}) {
  <#list fieldList as field>
    if(${field.name} != null)
    {
      ${instance}.set${field.name?cap_first}(${field.name});
    } 
  </#list>
  }
  

  public ${domain} copyProperties(${domain} entity) {
    BeanUtils.copyPropertiesIgnoreNull(this, entity);
    return entity;
  }
}

 